﻿using System;
using System.Windows.Forms;

namespace WindowsApplication2._912_进程_线程.线程.创建Thread对象
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        public delegate void MyMethod();

        private void Form1_Load(object sender, EventArgs e)
        {
            Sample st = new Sample(listBox1);

            // 创建Thread对象
            //Thread t = new Thread(new ThreadStart(st.work));
            MyMethod m = new MyMethod(st.work);
            this.Invoke(m);
            // 启动线程
            //t.Start();
        }
    }
}